package com.lac.component.rabbitmq.partition;

import com.lac.component.model.MessageInfo;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author xiaokuixiao
 * date2025/7/2 13:31
 */
@Component
public class PartitionConsumer {

    @RabbitListener(queues = "partition_queue_0")
    public void handlePartition0(MessageInfo message) {
//        System.out.println("Received from partition 0: " +  message.getMessage());
    }


    @RabbitListener(queues = "partition_queue_1")
    public void handlePartition1(MessageInfo message) {
//        System.out.println("Received from partition 1: " +  message.getMessage());
    }

    @RabbitListener(queues = "partition_queue_2")
    public void handlePartition2(MessageInfo message) {
//        System.out.println("Received from partition 2: " +  message.getMessage());
    }
}
